package com.tyc.lifecycle.model;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Component
public class Dog implements InitializingBean, DisposableBean {

    public Dog() {
        System.out.println("dog construct ...");
    }

    public void destroy()throws Exception{
        System.out.println("dog destroy ...");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("dog init ...");
    }
}
